package com.zly.service.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zly.service.entity.User;
import com.zly.service.mapper.UserMapper;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController("/user")
public class UserController {
    @Resource
    private UserMapper userMapper;

    @GetMapping("/page")
    public Page<User> userPage(@RequestParam Long current, @RequestParam Long size) {
        Page<User> objectPage = new Page<>(current, size);
        return userMapper.selectPage(objectPage, null);

    }
}
